import { computed, ref } from "vue";

const tabBarSeleteIndex = ref(0);

export const useTabBarSelected = () => {
  const setSelectIndex = (index: number) => {
    tabBarSeleteIndex.value = index;
  };

  const selectedIndex = computed(() => tabBarSeleteIndex.value);
  return {
    setSelectIndex,
    selectedIndex,
  };
};
